﻿cmake_minimum_required(VERSION 3.0.0)

#工程名
project(LinkdoodBridge)

add_definitions(-DPLUGIN_EXPORTS)
add_compile_options(-std=c++11)

include_directories( ${PROJECT_SOURCE_DIR}/common)
if(CMAKE_PLATFORM STREQUAL "Linux")
	#set(CMAKE_C_FLAGS "shell pkg-config --cflags glib-2.0 gthread-2.0 dbus-1 dbus-glib-1")
	#set(CMAKE_CXX_FLAGS "shell pkg-config --cflags glib-2.0 gthread-2.0 dbus-1 dbus-glib-1")
	include_directories(/usr/lib/aarch64-linux-gnu/dbus-1.0/include /usr/include/dbus-1.0)
endif()	
#设置搜索源码
aux_source_directory(${PROJECT_SOURCE_DIR}/common SRCS)
aux_source_directory(. SRCS)
#生成动态库
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS}) 


if(CMAKE_PLATFORM STREQUAL "Linux")	
	TARGET_LINK_LIBRARIES(${PROJECT_NAME} -luuid -lglib-2.0 -lgthread-2.0 -ldbus-1 -ldbus-glib-1)
endif()	